docs(azure-sa-backup): update docs, add outputs and validations#1158
docs(azure-sa-backup): update docs, add outputs and validations#1158pablosanchezpaz wants to merge 25 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the azure-sa-backup module documentation and examples to be terraform-docs driven (header/footer injection), and clarifies a few variable descriptions to better communicate intent and usage.
Changes:
- Add terraform-docs scaffolding (
docs/header.md,docs/footer.md,.terraform-docs.yml) and regenerate the moduleREADME.md. - Improve input variable descriptions (
backup_resource_group_name,storage_account_id,lifecycle_policy_rule). - Add basic and comprehensive examples under
_examples/, including a large YAML reference moved out of the generated README.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/azure-sa-backup/variables.tf | Clarifies descriptions for key inputs; documents lifecycle_policy_rule as currently unused. |
| modules/azure-sa-backup/README.md | Replaces/expands generated README content with overview, usage, examples links, and updated inputs table. |
| modules/azure-sa-backup/docs/header.md | Adds terraform-docs header content (overview + basic example). |
| modules/azure-sa-backup/docs/footer.md | Adds terraform-docs footer content (examples links, resource links, support). |
| modules/azure-sa-backup/.terraform-docs.yml | Adds module-local terraform-docs configuration for README injection. |
| modules/azure-sa-backup/_examples/comprehensive/values.reference.yaml | Adds a comprehensive, external YAML reference for module inputs. |
| modules/azure-sa-backup/_examples/comprehensive/README.md | Documents the purpose/usage of the comprehensive YAML reference. |
| modules/azure-sa-backup/_examples/basic/README.md | Adds a minimal “basic” example README describing what to replace/run. |
| modules/azure-sa-backup/_examples/basic/main.tf | Adds a basic Terraform configuration wiring the module for file share backups only. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| output "blob_backup_vault_principal_id" { | ||
| description = "Principal ID of the backup vault managed identity; null if `backup_blob` is not configured or no identity is defined." | ||
| value = var.backup_blob != null && var.backup_blob.identity_type != null ? azurerm_data_protection_backup_vault.this[0].identity[0].principal_id : null | ||
| } | ||
|
|
||
| output "file_share_backup_policy_id" { | ||
| description = "Resource ID of the file share backup policy; null if `backup_share` is not configured." | ||
| value = var.backup_share != null ? azurerm_backup_policy_file_share.this[0].id : null | ||
| } | ||
|
|
||
| output "blob_backup_role_assignment_id" { | ||
| description = "Role assignment ID granting the backup vault access to the storage account; null if `backup_blob` is not configured or no identity is defined." | ||
| value = var.backup_blob != null && var.backup_blob.identity_type != null ? azurerm_role_assignment.this[0].id : null | ||
| } |
| - **Blobs (Data Protection)**: Backup vault, **blob backup policy**, optional **managed identity**, **role assignment** on the storage account for the vault identity, and a **blob backup instance**. | ||
|
|
||
| > ⚠️ **Known caveat**: Always set `backup_blob.identity_type` (for example, `SystemAssigned`) when enabling blob backup. The role assignment count uses `can(var.backup_blob.identity_type)`, which can evaluate to `true` even when the value is `null`; in that case plan/apply can fail when resolving `identity[0]`. | ||
|
|
No description provided.